package com.cxl.live.constants;

import com.google.common.base.Charsets;

import java.nio.charset.Charset;

/**
 * @Description: Constants
 * @Author: ChenXueLi
 * @Date: 2018-11-10 12:50
 */
public class Constants {

    public static final String APP_NAME = "qing";

    // 所有参数的前缀
    private final static String PRE_FIX = "qing_params_";

    // session存放用户登录的信息的字段
    public final static String LOGIN_INFO = PRE_FIX + "login_info";
    public final static String LOGIN_CODE_STRING = PRE_FIX + "login_code";
    public final static String LOGIN_ERROR_COUNT = PRE_FIX + "login_error_count";

    /**
     * 系统编码
     */
    public static final Charset CHARSET = Charsets.UTF_8;

    /**
     * 标识：是 / 否、启用 / 禁用 等
     */
    public interface Flag {
        Integer YES = 1;
        Integer NO = 0;
    }

    /**
     * 操作类型
     */
    public interface Operation {
        // 添加
        String ADD = "add";
        // 更新
        String UPDATE = "update";
        // 删除
        String DELETE = "delete";
    }

    /**
     * 性别
     */
    public interface Sex {
        // 男
        Integer MALE = 1;
        // 女
        Integer FEMALE = 0;
    }

}
